<template>
  <div class="page">
    <Navbar title="项目详情" />
    <div class="content">
      <div class="list-item">
        <div class="header f-r j-b a-c">
          <div class="title">{{ detail.projectName }}</div>
        </div>
        <div class="label">
          项目类型：{{ detail.projectType }}
        </div>
        <div class="label">
          我的代办员：{{ detail.handleLeader }} {{ detail.handlePhone }}
        </div>
        <div class="label">
          总投资：{{ detail.totalAmount }}（万元）
        </div>
        <div class="label">
          进度状态：{{ detail.progressName }}
        </div>
        <div class="label" style="margin-bottom: 0">
          领码日期：{{ detail.codingTime }}
        </div>
      </div>
      <ProjectCanvas style="padding: 0"/>
    </div>
  </div>
</template>

<script>
import { http_project } from '@/api'
import { progressStatus } from '@/eumn'
import ProjectCanvas from '@/views/my/project-canvas'

export default {
  name: 'ProjectProcessDetail',
  components: { ProjectCanvas },
  data() {
    return {
      detail: {
      },
      projectId: ''
    }
  },
  created() {
    const { projectId } = this.$route.query
    this.projectId = projectId
    http_project.detail({
      id: projectId
    }).then(res => {
      this.detail = {
        ...res.data,
        progressName: progressStatus.getName(res.data.progress)
      }
    })
  }
}
</script>

<style scoped lang="scss">
.page {
    .list-item {
        width: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        .header {
            .title {
                font-size: 18px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #333333;
                margin-right: 10px;
            }
            margin-bottom: 23px;
        }
        .label {
            font-size: 15px;
            line-height: 15px;
            height: 15px;
            color: #333333;
            margin-bottom: 15px;
            &:last-of-type {
                margin-bottom: 0;
            }
        }
    }
    .record-list {
        background: #FFFFFF;
        border-radius: 10px;
        padding: 20px;
        .title {
            font-size: 16px;
            font-family: PingFang SC;
            font-weight: bold;
            color: #333333;
            margin-bottom: 20px;
        }
        .record-item {
            margin-bottom: 20px;
            border: 1px solid #2B80FF;
            padding: 7px 12px 13px;
            border-radius: 10px;
            overflow: hidden;
            background-color: #fff;
            position: relative;
            .link {
                height: 12px;
                font-size: 12px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #2F86FD;
            }
            .label {
                height: 12px;
                font-size: 12px;
                color: #333333;
                margin-bottom: 15px;
                &:last-of-type {
                    margin-bottom: 0;
                }
            }

            .button1 {
                color: #2B80FF;
                width: 59px;
                height: 24px;
                background: #D8E8FF;
                border: 1px solid #2F86FD;
                border-radius: 10px;
                text-align: center;
                font-size: 12px;
                line-height: 22px;
                margin-bottom: 15px;
            }
            .status {
                width: 50px;
                height: 21px;
                line-height: 21px;
                font-size: 12px;
                color: #fff;
                border-radius: 0px 10px 0px 0px;
                position: absolute;
                right: -1px;
                top: 0;
                text-align:center;
            }
            .status1 {
                background: #4B93FE;
            }
            .status2 {
                background: #20B153;
            }
        }
    }
    .el-button {
        background-color: #2F86FD;
        border-color: #2F86FD;
        border-radius: 10px;
    }
}
</style>
